package mx.netbrain.util;

import java.net.URL;

public class FileWebUtil {

	private static final String WEBINF = "WEB-INF";
	private static final String NETBRAIN = "NetBrain";

	public String getWebInfPath() {
		String filePath = "";
		URL url = FileWebUtil.class.getResource("FileWebUtil.class");
		String className = url.getFile();
		filePath = className.substring(0,
				className.indexOf(WEBINF) + WEBINF.length());
		return filePath;
	}

	public String getWebPath() {
		String fileWeb = "";
		URL url = FileWebUtil.class.getResource("FileWebUtil.class");
		String className = url.getFile();
		fileWeb = className.substring(0,
				className.indexOf(NETBRAIN) + NETBRAIN.length());
		return fileWeb;
	}
}